package com.wlyuan.open.domain.service.jiajia;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author
 * 加加订单签收请求DTO
 */
@Data
public class OrderRequest {
    private Long tenantId;
    private Long userId;
    private Order order;

    @Data
    class Order{
        private Long orderId;
        private Integer signType;
        private String signDesc;
        private LocalDateTime signAt;
        private LocalDateTime receiptAt;
        private LocalDateTime receiptSignTime;
        private List<OrderGoods> goodsList;
        private List<OrderAttachment> attachments;
        private OrderScore score;

    }

    @Data
    class OrderGoods{
        private Long goodsId;
        private JSONObject echo;
        private OrderGoodsSignReceiptDetail goodsSign;
        private OrderGoodsSignReceiptDetail goodsReceipt;

    }

    @Data
    class OrderGoodsSignReceiptDetail {
        private Integer quantity;
        private Integer exceptionQuantity;
        private String desc;
        private Integer lackQuantity;
        private Integer loseQuantity;
        private Integer damageQuantity;
        private Integer otherQuantity;
    }

    @Data
    class OrderScore{
        private Integer score;
        private String scoreDesc;
    }

    @Data
    class OrderAttachment{
        private Integer type;
        private String url;
        private String name;
    }
}
